﻿/**
 * @file		ddim_user_custom.h
 * @brief		User custom wrapper
 * @note		None
 * @attention	None
 * 
 * <B><I>Copyright 2016 Socionext Inc.</I></B>
 */

/** @weakgroup user_custom_overview
@{
	CM0 User custom wrapper.<br>
@}*//* --- end of user_custom_overview */

#ifndef _DDIM_USER_CUSTOM_H_
#define _DDIM_USER_CUSTOM_H_

#include "typedef.h"

/*----------------------------------------------------------------------*/
/* Type Definition														*/
/*----------------------------------------------------------------------*/
typedef INT32			DDIM_USER_ER;			/**< Define type of "ER" (Type of OS function's return value) */
typedef ULLONG			DDIM_USER_SYSTIM;		/**< Define type of "SYSTIM" (Type of OS function's argument) */

/*----------------------------------------------------------------------*/
/* Definition															*/
/*----------------------------------------------------------------------*/
/* Error code */
#define D_DDIM_USER_E_OK			(0)				/**< Normal End */

/*----------------------------------------------------------------------*/
/* Enumeration															*/
/*----------------------------------------------------------------------*/
/* Nothing Special */

/*----------------------------------------------------------------------*/
/* Structure															*/
/*----------------------------------------------------------------------*/
/* Nothing Special */

/*----------------------------------------------------------------------*/
/* Global Data															*/
/*----------------------------------------------------------------------*/
/* Nothing Special */

/*----------------------------------------------------------------------*/
/* Macro																*/
/*----------------------------------------------------------------------*/
/* Nothing Special */

/** @weakgroup user_custom_api
@{*/
/*----------------------------------------------------------------------*/
/* Function																*/
/*----------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif

/**
Task delay wrapper function.
@param [in]		dlytim				: delay time [ms].
*/
VOID DDIM_User_Dly_Tsk(UINT32 dlytim);

/**
This function is wrapper function of get_tim().<br>
References system time.
@param [out]	p_systim			: Header address to variable to return the system time
@retval	D_DDIM_USER_E_OK			: Normal End
*/
DDIM_USER_ER DDIM_User_Get_Tim(DDIM_USER_SYSTIM* p_systim);

/**
Assertion error trap function.
*/
VOID DDIM_User_Assertion_Error(VOID);

#ifndef CO_DEBUG_ON_PC

/**
Printf wrapper function.
@param [in]		format				: printf format
*/
VOID DDIM_User_Printf(const CHAR* format, ...);

#endif	// CO_DEBUG_ON_PC

#ifdef __cplusplus
}
#endif

/* @} */	// user_custom_api group

#endif	// _DDIM_USER_CUSTOM_H_
